// =====================================================================================
//  Copyright (C) 2024 by Jiaxing Shao. All rights reserved

//  文 件 名:  Texture2D.h
//  作    者:  Jiaxing Shao, 980853650@qq.com
//  创建时间：  2024-08-01 22:09
//  描    述:  
// =====================================================================================
#pragma once

#include <string>

class Texture2D {
public:
    Texture2D(const std::string &path);
    ~Texture2D();

public:
    void bind(unsigned int slot = 0) const;
    void unbind() const;

    inline int getWidth() const
    {
        return m_width;
    }

    inline int getHeight() const
    {
        return m_height;
    }

private:
    std::string    m_filepath;
    unsigned int   m_rendererId;
    unsigned char *m_localBuffer;
    int            m_width;
    int            m_height;
    int            m_channels;
};